package com.pic.mgt.unit;

import java.io.File;

public class Business extends Unit {
	private String businessSN;
	private String businessType;
	private File targetFile;
	// (送多方新增)
	private long targetFileSize;
	
	public Business(String businessType) {
		super();
		
		this.businessType = businessType;
	}
	
	@Override
	public String getUnitName() {
		return this.getTargetFile().getName();
	}
	
	/**
	 * 回傳目標檔檔案名稱
	 * @return
	 */
	public String getTargetFilename() {
		if (null != this.targetFile) {
			return this.targetFile.getName();
		}
		else {
			return null;
		}
	}
	
	// getter and setter
	
	public String getBusinessSN() {
		return businessSN;
	}
	public void setBusinessSN(String businessSN) {
		this.businessSN = businessSN;
	}
	public File getTargetFile() {
		return targetFile;
	}
	public void setTargetFile(File targetFile) {
		this.targetFile = targetFile;
	}

	public String getBusinessType() {
		return businessType;
	}

	public void setBusinessType(String businessType) {
		this.businessType = businessType;
	}
	
	// (送多方新增)
	public long getTargetFileSize() {
		return this.targetFileSize;
	}
	
	// (送多方新增)
	public void setTargetFileSize(long targetFileSize) {
		this.targetFileSize = targetFileSize;
	}

}
